const a = function (
  { columns, data },
  { origin },
  { xe: { commafy, get, pluck, sum } }
) {
  const form = get(origin, "1793899801518063618", {});
  const unit = form.local?.unit || 10000;
  const ret = [];
  const sumField = pluck(
    columns.filter(({ params }) => params && params.summary == "sum"),
    "field"
  );
  if (sumField.length) {
    ret.push(
      columns.map((column, columnIndex) => {
        if (columnIndex === 0) return "总计";
        if (sumField.includes(column.field))
          return commafy((sum(data, column.field) ?? 0) / unit, { digits: 2 });
        return "";
      })
    );
  }
  return ret;
};

